//
//  MovieDataViewController.m
//  UI_豆瓣项目
//
//  Created by dllo on 15/10/31.
//  Copyright (c) 2015年 关业达. All rights reserved.
//

#import "MovieDataViewController.h"
#import "AppTools.h"
#import "MovieDataView.h"
@interface MovieDataViewController ()

@end

@implementation MovieDataViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
  
    
    // 解析
    NSString *urlStr = [NSString stringWithFormat:@"http://project.lanou3g.com/teacher/yihuiyun/lanouproject/searchmovie.php?movieId=%@", self.movieID];
   
  
    [AppTools geturlStr:urlStr Block:^(id result) {
        
        

        self.movieDataView = [[MovieDataView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
        self.movieDataView.backgroundColor = [UIColor whiteColor];
        [self.view addSubview:self.movieDataView];
        [_movieDataView release];
        
        self.movieX = [[Movie2 alloc] init];
        NSMutableDictionary *dic = [result objectForKey:@"result"];
        // 赋值
        NSLog(@"%@", dic);
        [self.movieX setValuesForKeysWithDictionary:dic];
        NSLog(@"%@", self.movieX);
        self.movieDataView.Bmovie = self.movieX;
      
    }];
   
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
